import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';

const modules = (import.meta as any).glob('./mock/*.tsx', { eager: true });

const mockModules: any[] = [];
Object.keys(modules).forEach((key) => {
  mockModules.push(...(modules[key] as any).default);
});

export function setupProdMockServer() {
  createProdMockServer(mockModules);
}
